package adv2;

import java.util.*;

public class FAnxingJihe {

	public static void main(String[] args) {
		// TODO 自动生成的方法存根
		List<Yuangong> l = new ArrayList<>();
		// l.add("xxx");
		l.add(new Yuangong("小吴", 22, "男", "副总", 19000, "hf001"));
		l.add(new Yuangong("da吴", 22, "男", "副总", 200, "hf002"));
		Yuangong s = l.get(0);
		Iterator<Yuangong> ir = l.iterator();
		while (ir.hasNext()) {
			Yuangong t = ir.next();
			System.out.println(t);
		}
		System.out.println(">>>>>>>");
		Map<Yuangong, String> map = new HashMap<>();// 存放员工对象及其职务
		map.put(new Yuangong("小吴", 22, "男", "副总", 19000, "hf001"), "副总");
		map.put(new Yuangong("小张", 23, "男", "门卫", 19000, "hf002"), "门卫");
		map.put(new Yuangong("老刘", 29, "男", "司机", 19000, "hf003"), "司机");
		map.put(new Yuangong("老宋", 32, "男", "办公室主任", 19000, "hf004"), "主任");
		map.put(new Yuangong("王莽", 52, "男", "安汉公", 1900000, "hf003"), "皇帝");
		Set<Yuangong> sk = map.keySet();

		Collection<String> values = map.values();
		// 不确定的情况下
		// List<Object> list=new

	}

}
